package com.usian.wemedia;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;

@MapperScan(basePackages = "com.usian.wemedia.mapper")
@EnableDiscoveryClient
@SpringBootApplication(exclude = MongoAutoConfiguration.class)
@ServletComponentScan
public class WemediaApplication {
    public static void main(String[] args) {
        SpringApplication.run(WemediaApplication.class, args);
    }


    /**
     * mybatis-plus 分页插件
     * @return
     */
    @Bean
    public PaginationInterceptor interceptor(){
        return new PaginationInterceptor();
    }
}
